package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "news_k16server")
public class NewsK16server implements Serializable {
	    private static final long serialVersionUID = 1L;
	    @Id
	    @Basic(optional = false)
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    @Column(name = "id")
	    private String id;
	    @Column(name = "servername")
	    private String servername;
	    @Column(name = "serverurl")
	    private String serverurl;
	    @JoinColumn(name = "k16menuid", referencedColumnName = "id")   
		@ManyToOne
	    private NewsK16Menu k16Menu;
	    @Column(name = "softagent")
	    private String softagent;
	    
	    public NewsK16server(){
	    	
	    }
	    public NewsK16server(String id){
	    	this.id=id;
	    }
		
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public String getServername() {
			return servername;
		}
		public void setServername(String servername) {
			this.servername = servername;
		}
		public String getServerurl() {
			return serverurl;
		}
		public void setServerurl(String serverurl) {
			this.serverurl = serverurl;
		}
		public NewsK16Menu getK16Menu() {
			return k16Menu;
		}
		public void setK16Menu(NewsK16Menu menu) {
			k16Menu = menu;
		}
		public String getSoftagent() {
			return softagent;
		}
		public void setSoftagent(String softagent) {
			this.softagent = softagent;
		}
		
		@Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (id != null ? id.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {
	        if (!(object instanceof NewsK16server)) {
	            return false;
	        }
	        NewsK16server other = (NewsK16server) object;
	        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "com.dp.vo.NewsK16server[id=" + id + "]";
	    }
}
